package com.frame.database;

import java.util.List;

public class PageResult {

	private int pageCount;

	private int pageSize;

	private int pageNo;

	private int resultCount;

	private List list;

	public PageResult(){

	}
	public PageResult(int pageSize,int pageNo){
		this.pageSize=pageSize;
		this.pageNo=pageNo;
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}

	public int getPageCount() {
		if(pageSize>0 && resultCount>0){
			int m=resultCount%pageSize;
			if(m>0)
				pageCount=resultCount/pageSize+1;
			else
				pageCount=resultCount/pageSize;
		}
		return pageCount;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getResultCount() {
		return resultCount;
	}

	public void setResultCount(int resultCount) {
		this.resultCount = resultCount;
	}

}
